package com.myself.cloud.service.controller;

import com.myself.cloud.entity.ResultEntity;
import com.myself.cloud.entity.bean.ApproveProcessConfig;
import com.myself.cloud.service.service.IFeginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 审批流配置表 前端控制器
 *
 * @author baijialiang
 * @since 2022-07-04
 */

@RestController
@Api(value = "fegin调用测试", tags = "fegin调用测试")
@RequestMapping("/fegin/test")
@Slf4j
public class FeginTestController {
    @Autowired
    IFeginService feginService;

    @RequestMapping("/list")
    @ApiOperation(value = "审批流配置表列表查询", notes = "list")
    public ResultEntity<List<ApproveProcessConfig>> list(@RequestBody ApproveProcessConfig approveProcessConfig) {
        // 自己补写条件
        return feginService.getList(approveProcessConfig);
    }

    @RequestMapping("/test1")
    @ApiOperation(value = "测试连通性", notes = "测试连通性")
    public ResultEntity test() {
        return ResultEntity.success();
    }
}
